<?php
namespace app\api\model;

use app\model\Base;

class UserWelfarePointsLog extends Base
{
    public function getAmountFormatAttr($value, $data)
    {
        $str = '';
        if($data['amount'] > 0){
            $str = '+' . $data['amount'];
        }
        return $str;
    }

    public function getImgAttr($value, $data)
    {
        return get_oss_url('/static/system/accounts/wallets/3.png');
    }

    public function getModeAttr($value, $data)
    {
        $str = '';
        if($data['amount'] > 0){
            $str = '+';
        }
        return $str;
    }

    public function getContentAttr($value, $data)
    {
        $str = '';
        switch ($data['type']){
            case 'admin_recharge':
                $str = '众益健康充值';
                break;
            default:
                $str = $data['content'];
                break;
        }
        return $str;
    }
}